package com.example.wxminiprogram.service.GoodsServiceImpl;

import com.example.wxminiprogram.mapper.HomeMapper;
import com.example.wxminiprogram.pojo.Floor;
import com.example.wxminiprogram.pojo.SwiperItem;
import com.example.wxminiprogram.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class HomeServiceimpl implements HomeService {
    @Autowired
    private HomeMapper homeMapper;
    @Override
    public List<SwiperItem> getAllSwiper(){
        return this.homeMapper.getAllSwiper();
    }
    @Override
    public Floor getFloor(){
        Floor floor = new Floor();

        floor.floor_title.put("name","精选好茶");
        floor.floor_title.put("image_src","");
        floor.product_list.get(0).put("name","原产金银花");
        floor.product_list.get(0).put("image_src","http://192.168.56.1:8080/Home/product0.png");
        floor.product_list.get(0).put("image_width","232");
        floor.product_list.get(0).put("goods_id","1");
        return floor;
    }
}
